Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npm-install-package

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-install-package

Install an npm package

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
56K
decreased by-3.56%
Maintainers
1
Weekly downloads
 
Created
Source

npm-install-package

NPM version build status Test coverage Downloads js-standard-style

Install an npm package.

Installation

$ npm install npm-install-package

Usage

const npmInstallPackage = require('npm-install-package')

npmInstallPackage('cliclopts', opts, err => {
  if (err) throw err
})

With multiple installs, offline-first fetching and saving to dev dependencies:

const npmInstallPackage = require('npm-install-package')

const devDeps = [ 'map-limit', 'minimist', 'cliclopts' ]
const opts = { saveDev: true, cache: true }
npmInstallPackage(devDeps, opts, err => {
  if (err) throw err
})

API

npmInstallPackage(dependencies, options, cb)

Install an array of dependencies. Opts can contain the following values:

  • save: save a value to dependencies. Defaults to false
  • saveDev: save a value to devDependencies. Defaults to false
  • cache: attempt to get packages from the local cache first. Defaults to false
  • silent: install packages silently without writing to stdout. Defaults to false

License

MIT

Keywords

FAQs

Package last updated on 05 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc